﻿<Window x:Class="OrderView.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="订单查看" Height="350" Width="600" Loaded="Window_Loaded">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Name="sp" Grid.Row="0" Orientation="Horizontal">
            <RadioButton Content="淘宝 梦诗姬" Margin="3" VerticalAlignment="Center"/>
            <RadioButton Content="网购 梦诗姬" Margin="3" VerticalAlignment="Center"/>
            <RadioButton Content="网购 尚美琦" Margin="3" VerticalAlignment="Center"/>
            <ComboBox Name="cbbEncoding" Margin="3" DisplayMemberPath="BodyName" VerticalAlignment="Center" Width="80">
            </ComboBox>
            <Button Name="btnOpen" Click="btnOpen_Click" Content="打开" Width="60" Margin="3"/>
            <Button Name="btnClear" Click="btnClear_Click" Content="清空" Width="60" Margin="3"/>
        </StackPanel>
        
        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <Ellipse Fill="Red" Height="20" Width="20" Margin="3"/>
            <TextBlock Text="用户存在多个订单" Margin="3" VerticalAlignment="Center"/>
            <Ellipse Fill="Yellow" Height="20" Width="20" Margin="3"/>
            <TextBlock Text="地址中包含村" Margin="3" VerticalAlignment="Center"/>
        </StackPanel>

        <DataGrid Grid.Row="2" Name="dgvOrders" Margin="3" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Extended" SelectionUnit="CellOrRowHeader" RowHeaderWidth="25" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Auto">
            <DataGrid.RowStyle >
                <Style TargetType="{x:Type DataGridRow}">
                    <Setter Property="Background" Value="{Binding Path=Background}">
                    </Setter>
                </Style>
            </DataGrid.RowStyle>
            <DataGrid.Columns>
                <DataGridTextColumn Header="商店名称" Binding="{Binding ShopName}" Width="Auto"/>
                <DataGridTextColumn Header="QQ号码" Binding="{Binding QQ}" Width="Auto"/>
                <DataGridTextColumn Header="QQ昵称" Binding="{Binding QQNickName}" Width="Auto"/>
                <DataGridTextColumn Header="真实姓名" Binding="{Binding RealName}" Width="Auto"/>
                <DataGridTextColumn Header="商品名称" Binding="{Binding Item}" Width="Auto"/>
                <DataGridTextColumn Header="商品价钱" Binding="{Binding Money}" Width="Auto"/>
                <DataGridTextColumn Header="联系电话" Binding="{Binding Phone}" Width="Auto"/>
                <DataGridTextColumn Header="联系地址" Binding="{Binding Address}" Width="*"/>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
